<template>
	<div>
		child
		<p>child--{{num}}</p>
		<button @click="sendMsg">发送</button>
	</div>
</template>
<script>
	export default {
		name:"child",
		data(){
			return{
				msg: "我是child发送数据"
			}
		},
		methods: {
			sendMsg : function (event) {
				this.$emit("sendMsg",this.divideNum);
			}
		},
		components: {
			
		},
		computed: {
			divideNum: function () {
				return this.num / 5;
			}
		},
		props:{
			num:{
				type:Number,
				default: 1
			}
		}
	}
</script>
<style>
	
</style>